package com.pattern.structural.composite;

public class Client {

	public static void main(String[] args) {
		Folder composite = new Folder();
		composite.add(new Document("Java学习笔记"));
		Folder folder = new Folder();
		folder.add(new Document("组合模式学习笔记（上）"));
		folder.add(new Document("组合模式学习笔记（下）"));
		composite.add(folder);
		System.out.println("打印文档的数量为：" + composite.getCount());
		composite.print();
	}

}
